enum Foos {
Foo,
Bar,
}
foreach(Foos val in Enum.GetValues(typeof(Foos))) {
//Do whatever with the value :D
}
var values = Enum.GetValues(typeof(Foos));
foreach(Foos foo in values) {
// do something, use foo
}
// or
foreach(Foos foo in Enum.GetValues(typeof(Foos))) {
// do something, use foo
}
var values = Enum.GetValues(typeof(Foos)).Cast<Foos>();
var values = Enum.GetValues(typeof(Foos));
var values = Enum.GetValues(typeof(Foos));